<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>书籍列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

</head>
<body>
<a>书籍列表</a>
<div class ="col-md-4 column">
    <form action="${pageContext.request.contextPath}/book/queryBook" method="post">
        <input type="text" name="queryBookName" class="form-control" placeholder="请输出要查询的书籍名称">
        <input type="submit" value="查询">
    </form>
</div>
<div>
    <table>
        <thead>
        <tr>
            <th>书籍编号</th>
            <th>书籍名字</th>
            <th>书籍数量</th>
            <th>书籍详情</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="book" items="${list}">
            <tr>
                <td>${book.bookID}</td>
                <td>${book.bookName}</td>
                <td>${book.bookCounts}</td>
                <td>${book.detail}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/book/toUpdateBook?id=${book.bookID}">修改</a>
                    &nbsp; |&nbsp;
                    <a href="${pageContext.request.contextPath}/book/deleteBook/${book.bookID}">删除</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>


    </table>
</div>
</body>
</html>
